gen-demo-header.py: Fix running without git
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 18 May 2021 03:02:27 +0000 (11:02 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 18 May 2021 03:25:20 +0000 (11:25 +0800)
commitc18a1ac1a19fed1734d456741faa38e2d25ab8cf
tree76d6c128541a99991fa4dec418daa43816429a22
parentab6e4bfc8d847d730a5ae71d107126e91e561f88
gen-demo-header.py: Fix running without git

The script assumes that the git program is in the PATH which may not be always
the case, so if git was not found, fallback to the former behavior of making
VCS_TAG an empty string if the profile option was not set to 'devel'.

Also fix the call to the script so that we do indeed call GIT on the source GIT
repo so that we can get the right short SHA1 sum.

Re-organize the code a bit in the process, so that things seem cleaner.
build-aux/meson/gen-demo-header.py
demos/meson.build